package homework;

import java.util.Arrays;

public class ArrayDemo1 {
    public static void main(String[] args) {
        int[] arr =new int[20];
        for (int i = 0; i < arr.length; i++) {
            arr[i]=(int)(Math.random()*100+1);
            System.out.println(arr[i]);
        }
        System.out.println("排序后");
        Arrays.sort(arr);
        for (int i = 0; i < arr.length; i++) {
            System.out.println(arr[i]);
        }


    }
}
